package com.baitai.system.mapper;

import java.util.Date;
import java.util.List;
import com.baitai.system.domain.ReceiveTask;
import com.baitai.system.domain.ReceiveTaskFile;
import com.baitai.system.domain.vo.ReceiveTaskVo;
import org.apache.ibatis.annotations.Param;

/**
 * 接取任务关系Mapper接口
 * 
 * @author xx
 * @date 2024-07-20
 */
public interface ReceiveTaskMapper 
{
    /**
     * 查询接取任务关系
     * 
     * @param id 接取任务关系主键
     * @return 接取任务关系
     */
    public ReceiveTask selectReceiveTaskById(Long id);

    /**
     * 查询接取任务关系列表
     * 
     * @param receiveTask 接取任务关系
     * @return 接取任务关系集合
     */
    public List<ReceiveTask> selectReceiveTaskList(ReceiveTask receiveTask);

    /**
     * 新增接取任务关系
     * 
     * @param receiveTask 接取任务关系
     * @return 结果
     */
    public int insertReceiveTask(ReceiveTask receiveTask);

    /**
     * 修改接取任务关系
     * 
     * @param receiveTask 接取任务关系
     * @return 结果
     */
    public int updateReceiveTask(ReceiveTask receiveTask);

    /**
     * 删除接取任务关系
     * 
     * @param id 接取任务关系主键
     * @return 结果
     */
    public int deleteReceiveTaskById(Long id);

    /**
     * 批量删除接取任务关系
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteReceiveTaskByIds(Long[] ids);

    /**
     * 批量删除任务提交文件表
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteReceiveTaskFileByReceiveTaskIds(Long[] ids);
    
    /**
     * 批量新增任务提交文件表
     * 
     * @param receiveTaskFileList 任务提交文件表列表
     * @return 结果
     */
    public int batchReceiveTaskFile(List<ReceiveTaskFile> receiveTaskFileList);
    

    /**
     * 通过接取任务关系主键删除任务提交文件表信息
     * 
     * @param id 接取任务关系ID
     * @return 结果
     */
    public int deleteReceiveTaskFileByReceiveTaskId(Long id);

    ReceiveTask selectReceiveTaskByUserIdAndTaskId(@Param("userId") Long userId, @Param("taskId")Long taskId);

    int deleteReceiveTaskByUserIdAndTaskId(@Param("userId") Long userId, @Param("taskId") Long taskId);

    ReceiveTaskVo selectReceiveTaskVoById(Long id);

    List<ReceiveTask> selectReceiveTaskListByUserId(@Param("userId") Long userId);

    int waitAuditNumber(@Param("userId")Long userId);

    int finishNumber(@Param("start") Date start, @Param("end")Date end, @Param("userId")Long userId);
}
